package cn.hiapi.shopkeeper.jpa.activity;

import cn.hiapi.basic.jpa.BasicRepository;
import cn.hiapi.shopkeeper.entity.activity.ActivityCodeRecord;
import com.alibaba.fastjson.JSONObject;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author AdinZ
 * @date 2023/1/1 22:56
 */
public interface ActivityCodeRecordJpa extends BasicRepository<ActivityCodeRecord,Long> {
    @Query("select count(e.id) as count,e.status as status from ActivityCodeRecord e where e.oid=?1 group by e.status")
    List<JSONObject> totalCount(long oid);
}
